package com.example.ipcdemo.activity;

import android.content.Intent;
import android.widget.Toast;

import com.example.mmkv.MMKVDemoActivity;
import com.zy.activity.BaseMenuActivity;
import com.zy.activity.bean.BaseBean;

import java.util.List;

public class StoreActivity extends BaseMenuActivity {

    private final String TAG = "StoreActivity";

    @Override
    protected void init(List<BaseBean> list) {
        list.add(new BaseBean("存储"));
        list.add(new BaseBean("MMKV", 1));
        list.add(new BaseBean("SP", 2));
        list.add(new BaseBean("数据库", 3));
    }

    @Override
    protected void clickItem(BaseBean bean) {
        if (bean.getCode() == 1) {
            startActivity(new Intent(this, MMKVDemoActivity.class));
        } else {
            Toast.makeText(this, "待更新", Toast.LENGTH_LONG).show();
        }
    }
}